<?php

namespace Tian\Model;

use Think\Model;

class SourceModel extends Model {

    function getModalsDictionary($code,$table='source_dictionary') {//模板字典
        $info = M($table)->field("id")->where("code = '" . $code . "'")->find();
        $lists = M($table)->field("id,name")->where("pid = " . $info['id'] . " AND is_check = 1")->order("ord ASC")->select();
        return $lists;
    }

}
?>

